<template>
  <div class="left-card">
      <div class="left-card-head">
        <slot name="head">
          <div class="left-card-title">
            <img src="@/assets/screen/slash1.svg" />
            <img src="@/assets/screen/slash2.svg" />
            <div class="left-card-title__txt">
              <slot name="head-title">{{title}}</slot>
            </div>
          </div>
          <div class="left-card-tool">
            <slot name="head-tool"></slot>
          </div>
        </slot>
      </div>

      <div class="left-card-main">
        <slot></slot>
      </div>
  </div>
</template>

<script>
export default {
  name: 'left-card',
  props: {
    title: String
  }
}
</script>

<style lang="scss" scoped>
.left-card {
  width: 100%;
  height: 275px;
  background-image: url("~@/assets/screen/card-bg1.svg");
  background-size: 100% 100%;
  padding: 15px;

  &:hover, &.actived {
    background-image: url("~@/assets/screen/card-bg1-hover.svg");
    background-size: 100% 100%;
  }

  &-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  &-title {
    flex: 1;
    display: flex;
    align-items: center;

    &__txt {
      font-size: 20px;
      color: #EAFEFF;
      text-shadow: 0 4px 2px rgb(22 115 255 / 60%);
      font-weight: 700;
      margin-left: 6px;
    }
  }
  &-tool {
    margin-right: 15px;
    display: flex;
    align-items: center;
  }
  &-main {
    height: calc(100% - 70px);
    margin-top: 13px;
  }
}

</style>
